// Aufgabe_11_3_Kreisteppich

function setup() {
  createCanvas(600, 600);
}

function draw(){
  background(100, 200, 255);
  translate(width/2, height/2);
  kreis(0, 0, 200, 200);
}

function kreis(x, y, b, h){
  stroke(255, 0, 0);
  fill(100, 0, 200);
  ellipse(x, y, b, h);

if(b > 5){
  // waagerecht und senkrecht
  kreis(x+b, y, b/3, h/3);
  kreis(x-b, y, b/3, h/3);
  kreis(x, y+b, b/3, h/3);
  kreis(x, y-b, b/3, h/3);
 // diagonal
  kreis(x+b, y+b, b/3, h/3);
  kreis(x-b, y-b, b/3, h/3);
  kreis(x+b, y-b, b/3, h/3);
  kreis(x-b, y+b, b/3, h/3);
 }
}
